var app = getApp(),
  $ = require("../../utils/httpHelper.js")
Page({
  data: {
    indexArray: [],
    userInfo: {},
    fans_num:'',
    fav_num:'',
    cart_num:''
  },
  onShareAppMessage: function (res) {
    let member_id = app.globalData.userInfo.member_id
    return {
      title: '牛邵教育',
      path: '/pages/index/index?inviter_id=' + member_id,
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      }
    }
  },
  onLoad: function (e) {
    var that = this;
    this.setData({ userInfo: app.globalData.userInfo })
   
    
  },
  onShow:function(e){
    // $.httpPost("member_index", { rd_session: app.globalData.userInfo.rd_session }, (data, err) => {
    //   this.setData({
    //     fans_num: data.data.fans,
    //     fav_num: data.data.favorite,
    //     cart_num: data.data.cart
    //   })
    // })
  },
  toorder:function(e){
    let id = e.currentTarget.dataset.id
    console.log(e)
    wx.navigateTo({
      url: '/pages/order/order?id='+id,
    })
  },
  toallclass(){
    wx.navigateTo({
      url: '/pages/class/allclass',
    })
  },
  tomyclass(){
    wx.navigateTo({
      url: '/pages/class/myclass',
    })
  },
  tomoney(){
    wx.navigateTo({
      url: '/pages/mine/money',
    })
  },
  tocar() {
    wx.navigateTo({
      url: '/pages/car/shop-cart',
    })
  },
  tocolle(){
    wx.navigateTo({
      url: '/pages/mine/colle',
    })
  },
  toadr() {
    wx.navigateTo({
      url: '/pages/address/addressli',
    })
  },
  phone1: function () {
    var that = this;
    wx.makePhoneCall({
      phoneNumber: "17782833823"
    })
  },
});